<template>
  <el-dialog title="详情" :visible.sync="visible" @close="$emit('update:visible', false)" destroy-on-close>
    <el-form :model="content" label-width="120px" inline label-position="left">
      <el-form-item prop="imgUrl" label="规格图片">
        <div class="userCk">
          <el-avatar size="large" :src="content.imgUrl" shape="square"></el-avatar>
        </div>
      </el-form-item>
      <el-form-item prop="productId" label="商品ID">
        <div class="userCk">
          {{content.productId}}
        </div>
      </el-form-item>
      <el-form-item prop="specsName" label="规格名称">
        <div class="userCk">
          {{content.specsName}}
        </div>
      </el-form-item>
      <el-form-item prop="specsOption" label="规格选项">
        <div class="userCk">
          {{content.specsOption}}
        </div>
      </el-form-item>
      <el-form-item prop="price" label="规格商品价格">
        <div class="userCk">
          {{formatNumber(content.price)}}
        </div>
      </el-form-item>
      <el-form-item prop="marketPrice" label="规格划线价格">
        <div class="userCk">
          {{formatNumber(content.marketPrice)}}
        </div>
      </el-form-item>
      <el-form-item prop="points" label="购买获得积分">
        <div class="userCk">
          {{formatNumber(content.points)}}
        </div>
      </el-form-item>
      <el-form-item prop="stock" label="库存数量">
        <div class="userCk">
          {{formatNumber(content.stock,true)}}
        </div>
      </el-form-item>
      <el-form-item prop="createDate" label="创建时间">
        <div class="userCk">
          {{content.createDate}}
        </div>
      </el-form-item>
    </el-form>
    <template slot="footer">
      <el-button @click="$emit('update:visible', false)">取消</el-button>
    </template>
  </el-dialog>
</template>
<script>
import {formatNumber, getDictLabel} from "@/utils";

export default {
  name: 'ComProductSpecsList',
  data() {
    return {}
  },
  props: {
    content:Object,
    visible:Boolean
  },
  methods: {
    formatNumber,
    getDictLabel
  }
}
</script>
<style>
  .userCk{
    width: 260px;
    font-weight: 700;
  }
</style>
